<template>
  <div>
    <!-- 分页器 -->
    <el-pagination
        :current-page="page"
        :page-size="pageSize"
        layout="prev, pager, next"
        :total="total"
        @current-change="handleCurrentChange"
    />
  </div>
</template>

<script>
export default {
  data() {
    return {
    }
  },
  props:{
    page: 1,
    pageSize: 2 ,
    total: 0,
    sendPage: {
      type: Function,
      required: true
    }
  },
  methods: {
    handleCurrentChange(page) {
      this.page = page;
      this.sendPage(page)
    },

      sendPage(page) {
        this.sendPage(page);
      }

  },
}
</script>
